# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=libgexiv2
pkgver=0.14.0
pkgrel=4
pkgdesc='GObject-based wrapper around the Exiv2 library'
url='https://wiki.gnome.org/Projects/gexiv2'
arch=(loong64 x86_64)
license=(GPL2)
depends=(exiv2 glib2)
makedepends=(gobject-introspection meson python-gobject vala)
source=("https://gitlab.gnome.org/GNOME/gexiv2/-/archive/gexiv2-$pkgver/gexiv2-gexiv2-$pkgver.tar.bz2")
b2sums=('154c8e870e7ef9189268a1c3dc3ed9cf0da933491dc874c6d28b4db1a0126a12fe9ca8cd03ba5bc33b535b9094a6c859e56a8f9f648703c7add1c5fd02a9a168')


build() {
  arch-meson gexiv2-gexiv2-$pkgver build -D gtk_doc=true
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  depends+=(libg{lib,object,io}-2.0.so libexiv2.so)
  provides+=(libgexiv2.so)
  meson install -C build --destdir "$pkgdir"
}
